#include<bits/stdc++.h>
using namespace std;
using ll = long long;

const int N = 1e5 + 5;
int n, cards[N], cards2[N], ans, maxr, minr = N, rss[N];
int x, counts, beatens;

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    for (int i = 1; i <= n; i++){
        cin >> x;
        if (!cards[x]){
            rss[++counts] = x;
        }
        cards[x]++, cards2[x]++;
    }
    sort(rss + 1, rss + counts + 1);
    for (int i = 1; i <= counts; i++){
        for (int j = i + 1; j <= counts; j++){
            if (cards2[rss[i]] <= 0) break;
            if (cards[rss[j]]){
                beatens = min(cards2[rss[i]], cards[rss[j]]);
                ans += beatens;
                cards[rss[j]] -= beatens;
                cards2[rss[i]] -= beatens;
            }
        }
    }
    ans = n - ans;
    cout << ans;

    return 0;
}
